package service.impl;

import controller.NewServlet;
import dao.NewsDao;
import dao.impl.NewsDaoimpl;
import entity.News;
import service.NewsService;

import java.util.List;

public class NewsServiceimpl implements NewsService {
    NewsDao newsDao = new NewsDaoimpl();

    @Override
    public List<News> getNewsList() {
        return newsDao.getNewsList();
    }

    @Override
    public int delNews(int i) {
        return newsDao.delNews(i);
    }

    @Override
    public News selNews(int i) {
        return newsDao.selidNews(i);
    }

    @Override
    public int upNews(News news) {
        return newsDao.upNews(news);
    }

    @Override
    public int addNews(News news) {
        return newsDao.addNews(news);
    }
}
